shortcut for calculating the mod